﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace B.S.DataBase.MyProject.Domain.Sales
{
    /// <summary>
    /// 销售订单表
    /// </summary>
    [Table("SaleOrderInfo")]
    public class SaleOrderInfo
    {
        /// <summary>
        /// 1单据编码 主键 销售订单信息表唯一标识
        /// </summary>
        [Key]
        public Guid Id { get; set; }
        /// <summary>
        /// 2业务类型  1销售订单 2采购入库 3销售出库
        /// </summary>
        public int BusinessType { get; set; } = 1;
        /// <summary>
        /// 3业务状态（1:正常，2:挂起，3:手工关闭，4:系统关闭）
        /// </summary>
        public int BusinessStatus { get; set; } = 1;
        /// <summary>
        /// 4单据类型  1:业务订单 2：入库单  3:出库单
        /// </summary>
        public int DocumentType { get; set; } = 1;
        /// <summary>
        /// 5单据状态（0:开立 1:退回  2：审核）
        /// </summary>
        public int DocumentStatus { get; set; } = 0;
        /// <summary>
        /// 6操作员
        /// </summary>
        public string? Oprator { get; set; }
        /// <summary>
        /// 7客户名称
        /// </summary>
        public int? CustomerId { get; set; }
        /// <summary>
        /// 8单据日期（默认当前日期：）
        /// </summary>
        public DateTime DocumentDate { get; set; }= DateTime.Now;
        /// <summary>
        /// 9收货人
        /// </summary>
        public string? Receiver { get; set; }
        /// <summary>
        /// 10审核员
        /// </summary>
        public string? ExamUser { get; set; }
        /// <summary>
        /// 11合同号
        /// </summary>
        public string? Contract { get; set; }
        /// <summary>
        /// 12电话
        /// </summary>
        public string? Phone { get; set; }
        /// <summary>
        /// 13销售部门
        /// </summary>
        public int? SaleDempt { get; set; }
        /// <summary>
        /// 14审核日期
        /// </summary>
        public DateTime ExamDate { get; set; }=DateTime.Now;
        /// <summary>
        /// 15付款日期
        /// </summary>
        public DateTime PayDate { get; set; } = DateTime.Now;
        /// <summary>
        /// 16地址
        /// </summary>
        public string? Address { get; set; }
        /// <summary>
        /// 17销售人员
        /// </summary>
        public string? SaleUser { get; set; }
        /// <summary>
        /// 18销售类型[1 国内品牌  2 外购成品  3 外购原料  4  自接订单  5 自制销售  6 客供销售]
        /// </summary>
        public int? SaleType { get; set; }
        /// <summary>
        /// 19交付日期
        /// </summary>
        public DateTime DeliverDate { get; set; } = DateTime.Now;
        /// <summary>
        /// 20目的国家
        /// </summary>
        public string? GoalCountry { get; set; }
        /// <summary>
        /// 21供货方式
        /// </summary>
        public int? SupplyType { get; set; }
        /// <summary>
        /// 22交期状态（预计 确认）
        /// </summary>
        public bool? DeliveryStatus { get; set; }
        /// <summary>
        /// 23备注信息
        /// </summary>
        public string? Remark { get; set; }
    }
}
